<!DOCTYPE html>
<html class="um landscape min-width-240px min-width-320px min-width-480px min-width-768px min-width-1024px">
<head>
    <title></title>
    <meta charset="utf-8">
    <meta name="viewport" content="target-densitydpi=device-dpi, width=device-width, initial-scale=1, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
	<link rel="stylesheet" href="../css/ui-box.css">
    <link rel="stylesheet" href="../css/ui-base.css">
    <link rel="stylesheet" href="../css/ui-color.css">
    <link rel="stylesheet" href="../css/base.css">
    <link rel="stylesheet" href="../css/img.css">

	<script src="../js/core/zy_control.js"></script>
    <script src="../js/core/zy_click.js"></script>
    <script src="../js/core/appframework.js"></script>
    <script src="../js/main.js"></script>
    <script src="../js/core.js"></script>
    <script src="../js/res.js"></script>
    <script src="../js/signup.js"></script>
</head>
<body class="ub ub-ver">
    <div class="up3 ub-f1">
        <div class="uplr_p5 uc-a1 umt_1">
                <div class="ub ub-ac">
                     <div class="uw1p5 uh1p5 ub-img im_icon_phone uml_p5 umr_1"></div>
                     <input id="phone" placeholder="手机号/Mobile No" type="number"  class="input t-bla ub ub-f1">   
                     <div class="ub ub-ac ub-pe">
                        <div id="code" ontouchstart="zy_touch()" onclick="Signup.findPWD();" class="btn bc_btn t-wh ufp7 uw8 uh3 umb_p5 umr_4f5" style="padding:0.3em 0.7em;line-height:1.5em;">验证码<br/>Verification Code</div>
                     </div> 
                </div>
                <div class="b_list signup_input_ctn"></div>
            </div>
            <div class="uplr_p5 uc-a1 umt_1">
                <div class="ub ub-ac">
                     <div class="uw1p5 uh1p5 ub-img im_icon_phone uml_p5 umr_1"></div>
                     <input id="codeNum" placeholder="验证码/Verification Code" type="number"  class="input t-bla ub ub-f1">   
                     <div class="uml_3f"></div>
                </div>
                <div class="b_list signup_input_ctn"></div>
            </div>
            <div class="uplr_p5 uc-a1 umt_1">
                <div class="ub ub-ac">
                     <div class="uw1p5 uh1p5 ub-img im_icon_password uml_p5 umr_1"></div>
                     <input id="password" placeholder="新密码/New Password" type="password"  class="input t-bla ub ub-f1"> 
                </div>
                <div class="b_list signup_input_ctn"></div>
            </div>
            <div class="uplr_p5 uc-a1 umt_1">
                <div class="ub ub-ac">
                     <div class="uw1p5 uh1p5 ub-img im_icon_password uml_p5 umr_1"></div>
                     <input id="password2" placeholder="确认密码/Confirm Password" type="password"  class="input t-bla ub ub-f1"> 
                     <div class="uml_3f"></div>
                </div>
                <div class="b_list signup_input_ctn"></div>
            </div>
            <div id="regBtn" ontouchstart="zy_touch()" onclick="findpwd();" class="btn bc_btn t-bla umt_2">完成/Confirm</div>   
            <div class="umt_1 ufp8 c_gra1 uw109">提示：手机号、验证码、密码是必填项</div>
            <div class="umt_1 ufp8 c_gra1 uml_3f5 uw139">Notice：Mobile No,Verification Code,Password are necessary</div>
        
        <!--<div class="ub umt_2 ub-ac ub-pc">
            <div class="uplr_p5 uc-a1 ub-f1"><input id="phone" placeholder="手机号" type="number" class="input_signup"><div class="b-bla signup_input_ctn"></div></div>
            <input id="code" class="ufp8 ub_center upp5 uh2 tx-c" type="button" value="验证码">
        </div>
        
        <div class="uplr_p5 uc-a1 umt_1"><input id="phonecode" placeholder="验证码" type="number" class="input_signup"><div class="b-bla signup_input_ctn"></div></div>
        <div class="uplr_p5 uc-a1 umt_1"><input id="pwd" placeholder="新密码" type="password" class="input_signup"><div class="b-bla signup_input_ctn"></div></div>
        <div class="umt_1 ufp8">* 提示：手机号、验证码、新密码是必填项</div>-->
    </div>
</body>
</html>
<script>
zy_init();
function findpwd(){
    if(!IsDefine($("#phone").val())){
                console.log("CurrentUser.category:"+CurrentUser.category);
                var sjh=$alertCE("手机号不能为空/Phone no can't be blank!");
                return sjh;   
            }
            if(!IsDefine($("#codeNum").val())){
                var yzm=$alertCE("验证码不能为空/Verification code can't be blank!");
                return yzm;   
            }
            if(!IsDefine($("#password").val())){
                var xmm=$alertCE("新密码不能为空/New password can't be blank!");
                return xmm;   
            }
            if(!IsDefine($("#password2").val())){
                var qzmm=$alertCE("确认密码不能为空/Confirm password can't be blank!");
                return qzmm;   
            }
            var yzm = GetLS("yanzhengma1");
            if(yzm.num != $("#codeNum").val()){
                $alertCE("验证码有误/Verification code isn't correct!");
                return;
            }
            if(yzm.phone != $("#phone").val() ){
                $alertCE("请使用正确的手机号/Please enter correct Mobile no!");
                return;
            }
            $ajax({
                url: "/user/resetPassword",
                data: {
                    phone: $("#phone").val(),
                    password: $("#password").val()
                },
                success: function(res) {
                    //(CurrentUser.category==30?$alert("修改成功，请重新登录"):$alertEn("Change the success, please log in"));
                    $alertCE("你已经设置了你的新密码/You have set your new password.");
                    WinClose();
                }
            }); 
}
window.uexOnload = function(type){
    if (!type) {
        Res.gnTitle({title:"<div class='uml_1 umr_1f'>找回密码/Retrieve Password</div>"});
        Add20ToHeader();
    }
}
</script>